Skip to content

FreeCol Final Project#5

Open
AlfredoGuillen wants to merge 21 commits intocosc442spring2017:masterfrom
AlfredoGuillen:master
Open

FreeCol Final Project#5
AlfredoGuillen wants to merge 21 commits intocosc442spring2017:masterfrom
AlfredoGuillen:master

Conversation

@AlfredoGuillen
Copy link

@AlfredoGuillen AlfredoGuillen commented May 20, 2017

Task 7 – Making a Pull Request

Group Members:

  • Alfredo Guillen
  • Andrew Shin
  • Edward Reilly

ashinster and others added 21 commits May 11, 2017 18:52
…variables are null, instead of checking if player was null twice. Bug found with FindBugs tool and was labeled as a 'Scary'
…om lhs == rhs, to lhs.equals(rhs) where lhs and rhs are both Integer objects
…joinMultiplayerGame() methods. Methods extracted as private methods
…o video is playing. Converted a video to .ogg format and placed into data/rules/classic/resources/video/. Then had to add a property in data/rules/classic/resources.properties to reference where the video is. The code uses these properties to index the data files like videos, sounds, images, etc. On the key listener for the intro video which lsitens for events to stop the video and go to the main menu screen, I instead had it execute another method which will stop the intro video and play the meme video.
Static methods used in FreeCol.java are now accessed in a static way.
Issue #9 fixed.  Added <FreeCol> type argument to the raw type "Class" .
Class is now parameterized.
…ely. The new intro video is muted, and another audio file is played in the background while the video is playing. This is done because the application would stall when trying to stop the video with a key or mous event. Audio can get choppy, but this is because of how these .ogg files are decoded. Sometimes the audio is a little choppy, sometimes it isn't.
…6.0.jar dependency. Thought we needed it but we don't.
Milestone hit for Issue #10 - still in progress.

FreeCol.java was separated into 3 different classes:
-FreeCol.java ~ responsible for starting the stand-alone server.
-CommandLineOptions.java ~ responsible for handling the command-line
arguments and starting the client-GUI.
-Shared.java ~ responsible for sharing variables between FreeCol.java
and CommandLineOptions.java.

handleArgs() was placed in CommandLineOptions.java. The Cyclomatic
complexity of handleArgs() was reduced to 52.

Comment documentation added for newly added methods and classes.
Issue #10 has been addressed.

The cyclomatic complexity of handleArg() has been reduced from 60 to 6.
handleArg() in its entirely was moved from FreeCol.java to
CommandLineOptions.java.

handleArg() was broken into smaller methods to reduce the over all
complexity. All methods derived from handleArg() remain in the
CommandLineOptions.java.

The highest code complexity in CommandLineOptions.java is now 6.

Comment documentation has been provided for every new method created.
The Playlist class was recognized as dead code and was removed.
The Xml.java class was recognized as dead code and was removed.
Issue #13 has been fixed.

Integer reference comparisons are removed. Integer instances are now
compared via the .equals() method.
…e used JUnit4, had to add the test to the suite using a JUnit4TestAdapter which takes in the StringUtilsTest.class. This is done so the Ant testall target will run these unit tests. Also added the JUnit4 jar and Hamcrest jar to the test/lib directory to run the JUnit4 test class.
Test cases are now available for methods in the net.sf.freecol package.

Refactoring was prevoiusly done separating one class into 3 separate
classes. Now there are test cases to verify that the altered class still
functions as intended.
@AlfredoGuillen AlfredoGuillen changed the title Task 7 – Making a Pull Request FreeCol Final Project May 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants